<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="ww" uri="/webwork"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="string" uri="http://jakarta.apache.org/taglibs/string-1.1"%>
<%@ taglib prefix="datetime" uri="http://jakarta.apache.org/taglibs/datetime-1.0" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>The Sunshine - History</title>
<link rel="StyleSheet" href="/css/main.css" type="text/css" media="all" />
<script type="text/javascript" src="/js/jquery.js"></script>
</head>
<body>
<div id="wrap">
	<ww:action name="header" namespace="/template" executeResult="true" flush="true" />
	<div id="content">
		<h1>Code Repository History List</h1>
		<p><span>* ${codeRepository.description} <i>${codeRepository.location}</i></span></p>
		<div>
			<p style="text-align: right;"><a href="list.web?name=${codeRepository.name}&from=${revisionInfos[fn:length(revisionInfos) - 1].revision - 1}">earlier</a> | <a href="list.web?name=${codeRepository.name}&to=${revisionInfos[0].revision + 1}">later</a></p>
			<c:forEach var="history" items="${revisionInfos}">
			<div>
				<ul>
					<li style="list-style: none;"><span><b><a href="changeset.web?name=${codeRepository.name}&revision=${history.revision}">${history.revision}</a></b></span> by <span><b>${history.author}</b> <datetime:format pattern="yyyy/MM/dd hh:mm:ss z" date="${history.date}" /></span></li>
					<li style="list-style: none;"><span>${history.commitMessage}</span></li>
					<li style="list-style: none;">
						<ul style="padding: 0px;">
							<c:forEach var="changedPath" items="${history.changedPathsMap}" varStatus="loopStatus">
								<c:if test="${loopStatus.count le 5}">
									<li style="list-style: none; padding: 0 0 0 10px;">${changedPath.value} - ${changedPath.key}</li>
								</c:if>
							</c:forEach>
							<c:if test="${fn:length(history.changedPathsMap) gt 5}">
								<li style="list-style: none; padding: 0 0 0 10px;"> ... ${fn:length(history.changedPathsMap) - 5} more files in <a href="changeset.web?name=${codeRepository.name}&revision=${history.revision}">changeset</a>.</li>
							</c:if>
						</ul>
					</li>
				</ul>
			</div>
			</c:forEach>
			<p style="text-align: right;"><a href="list.web?name=${codeRepository.name}&from=${revisionInfos[fn:length(revisionInfos) - 1].revision - 1}">earlier</a> | <a href="list.web?name=${codeRepository.name}&to=${revisionInfos[0].revision + 1}">later</a></p>
		</div>
	</div>
	<jsp:include page="/WEB-INF/template/footer.jsp" />
</div>
</body>
</html>
